Skip to content

Conversation

ks6088ts
Copy link
Member

@ks6088ts ks6088ts commented May 1, 2025

What this PR does / why we need it

  • add locust testing

Which issue(s) this PR fixes:

Fixes #5

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
ORGANIZATION=<organization-name>
REPOSITORY=<repository-name>

git clone [email protected]:$ORGANIZATION/$REPOSITORY.git
cd $REPOSITORY
  • Test the code
make ci-test

What to Check

Verify that the following are valid

  • ...

Additional Information

@ks6088ts ks6088ts requested a review from Copilot May 1, 2025 08:53
@ks6088ts ks6088ts self-assigned this May 1, 2025
@ks6088ts ks6088ts merged commit 375e022 into main May 1, 2025
4 checks passed
@ks6088ts ks6088ts deleted the feature/issue-5_locust-testing branch May 1, 2025 08:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds locust testing to the project to facilitate load testing and performance measurement.

  • Introduces a basic locustfile with a simple task that performs a GET request to the root endpoint.
  • Updates the project dependencies in pyproject.toml to include locust.
  • Enhances documentation by adding a section for Locust with a link to the quickstart guide.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
scripts/locustfile.py Adds a simple load-testing user class using Locust.
pyproject.toml Adds the locust dependency to the project.
docs/index.md Documents Locust with a link to its quickstart guide.
Files not reviewed (1)
  • Makefile: Language not supported

Comment on lines +1 to +4
from locust import HttpUser, task


class HelloWorldUser(HttpUser):
Copy link
Preview

Copilot AI May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a wait_time attribute to the HelloWorldUser class to simulate realistic user behavior. For example, you can add 'wait_time = between(1, 5)' to introduce random waiting periods between requests.

Suggested change
from locust import HttpUser, task
class HelloWorldUser(HttpUser):
from locust import HttpUser, task, between
class HelloWorldUser(HttpUser):
wait_time = between(1, 5)

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add locust testing
1 participant